package com.spring.config.system.initializer;

import com.spring.config.system.config.DatabaseConfig;
import com.spring.config.system.config.MvcConfig;
import com.spring.config.system.config.SpringConfig;
import org.springframework.web.servlet.support.AbstractAnnotationConfigDispatcherServletInitializer;

/**
 * ClassName: WebApplicationInitializer
 * Description: 系统初始化
 * Date: 2017/5/8 20:16
 *
 * @author SAM SHO
 * @version V1.0
 */
public class WebApplicationInitializer extends AbstractAnnotationConfigDispatcherServletInitializer {
    @Override
    protected Class<?>[] getRootConfigClasses() {
        return new Class[]{SpringConfig.class, DatabaseConfig.class};
    }

    @Override
    protected Class<?>[] getServletConfigClasses() {
        return new Class[]{MvcConfig.class};
    }

    @Override
    protected String[] getServletMappings() {
        return new String[]{"/"};
    }
}
